
// import { postLoginWxMin } from "@/api/profile"
import { postTestLoginWxMin } from "@/api/profile";
export default {
  // 命名空间
  namespaced: true,
  state: {
    userInfo:null
  },
  getters: {},
  mutations: {
    setUserInfo(state,payload){
      state.userInfo = payload
      console.log('mutations',state);
    }
  },
  actions: {
    async fetchWxLogin(store,params){
      // const res = await postLoginWxMin(params)
      const res = await postTestLoginWxMin(params)
      console.log('actions',store);
      store.commit('setUserInfo',res.result)
      
    }
  },
};
